// 导入路由组件
import Login from "@/views/Login";
import { Navigate, redirect } from "react-router-dom";

const routers = [
  {
    path: "/",
    element: <Login></Login>,
  },
  // {
  //   path: "/locate",
  //   element: <Locate></Locate>,
  //   loader: async () => {
  //     const login = sessionStorage.getItem("loginType");
  //     if (!login) throw redirect("/login");
  //     return login;
  //   },
  // },
  // {
  //   path: "/running",
  //   element: <Running></Running>,
  // },
  {
    path: "/*",
    element: <Navigate to={"/"} replace></Navigate>,
  },
];
export default routers;
